import PlatformAdapter from "./BaseAdapter";

export default class WechatAdapter implements PlatformAdapter {
  showToast(msg: string) {
    //@ts-ignore
    wx.showToast({ title: msg, icon: 'none', duration: 2000 });
  }

  showAlert(msg: string) {
    //@ts-ignore
    wx.showModal({ title: '提示', content: msg, showCancel: false });
  }

  showLoading(msg: string) {
    //@ts-ignore
    wx.showLoading({ title: msg, mask: true });
  }

  hideLoading() {
    //@ts-ignore
    wx.hideLoading();
  }
}